package com.four.collage.feign;

import com.guli.common.utils.R;
import com.guli.common.vo.CityVo;
import com.guli.common.vo.UserVo;
import com.guli.common.vo.UserabdcityVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author:wsy
 * @Date: 2021/12/19/14:42
 * @Description
 */
@FeignClient("four-user")
@RequestMapping("user")
public interface UserFeginservice {

    /**
     * 根据登录人查询
     * @param loginName
     * @return
     */
    @GetMapping("/user/findByUname/{loginName}")
    public UserVo findByUname(@PathVariable("loginName")String loginName);

    /**
     * 查询地址
     * 三级树
     * @return
     */
    @GetMapping("/city/threeCity")
    public List<CityVo> threeCity();

    /**
     * 添加用户地址
     * @param userabdcityVo
     * @return
     */
    @PostMapping("/userandcity/addUserandctiy")
    public R addUserandcity(@RequestBody UserabdcityVo userabdcityVo);

}
